{include file=header.html}
<script language="javascript" type="text/javascript" src="{res file=js/jquery-1.2.6.js}"></script>
<body>
<style type="text/css">
.page{float:none;}
.tab_info{width:100%;}
</style>
<script language="javascript" type="text/javascript">
$(function() {
$('th[type="order"]').click(function() {
var order = $(this).attr('field') + '-' + $(this).attr('order');
$('#order').val(order);
$('input[name="search"]').click();
}).css({'cursor': 'pointer', 'color': '#36c'});
var order = $('#order').val().split('-');
var field = $('th[type="order"][field="' + order[0] + '"]');
if (order[1] == 'ASC') {
field.attr('order', 'DESC').text(field.text() + '↑');
} else {
field.attr('order', 'ASC').text(field.text() + '↓');
}
if (order[0] != 'reg_time') {
$('th[type="order"][field="reg_time"]').attr('order', 'DESC');
}});

</script>
<div class="sub-body" style="width: 90%">
<div id="head">
	<div id="search">
		<form action="" method="get">
			<table cellspacing="0" cellpadding="0" class="search" width="100%">
				<tr>
					<th>布&nbsp;&nbsp;&nbsp;&nbsp;行：</th>
					<td>
						<select select_input="select_input" name="fabric_shop_id" class="input-3">
							<option value=" ">请选择布行/档口</option>
						<!--{foreach from=$fabricshop_list item=fabric_shop}-->
							<option value="{$fabric_shop.user_id}" {if $smarty.get.fabric_shop_id == $fabric_shop.user_id} selected{/if}>{$fabric_shop.user_name|escape}</option>
						<!--{/foreach}-->
						</select>
					</td>
					<th>类&nbsp;&nbsp;&nbsp;&nbsp;型：</th>
					<td>
						<select select_input="select_input" name="fabric_type_id" class="input-3">
							<option value=" ">请选择布行/档口类型</option>
						<!--{foreach from=$fabrictype_list item=fabric_type}-->
							<option value="{$fabric_type.fabric_type_id}" {if $smarty.get.fabric_type_id == $fabric_type.fabric_type_id} selected{/if}>{$fabric_type.fabric_type_name|escape}</option>
						<!--{/foreach}-->
						</select>
					</td>
					<td>
						<input type="hidden" name="app" value="fabric_shop" />
						<input type="hidden" name="act" value="merch_list" />
						<input type="hidden" name="order" id="order" value="{if $smarty.get.order}{$smarty.get.order}{else}reg_time-ASC{/if}" />
						<input type="submit" name="search" value="查询" class="inquiry" /></td>
				</tr>
			</table>
		</form>
	</div>
</div>
<div class="tab_info">
<div class="tab-title-1"><span>档口联络表</span></div>
<table width="100%" cellspacing="0" cellpadding="0" class="tab-display" id="tab-color1">
      <tr>
      	<th width="15%" type="order" field="reg_time" order="ASC">创建时间</th>
		<th width="15%" type="order" field="user_name" order="ASC">{$lang.fabric_shop_name}</th>
		<th width="15%" type="order" field="ftype_id" order="ASC">{$lang.fabric_type_name}</th>
		<th width="13%" type="order" field="phone_mob" order="ASC">{$lang.phone_mob}</th>
		<th width="13%" type="order" field="phone_tel" order="ASC">{$lang.phone_tel}</th>
		<th width="13%" type="order" field="is_qq" order="ASC">{$lang.is_qq}</th>
		<th width="13%" type="order" field="wx_sn" order="ASC">微信号</th>
		<th width="10%" type="order" field="email" order="ASC">{$lang.email}</th>
      </tr>
	 <!--{foreach from=$fabric_shops item=fabric}-->
       <tr>
       	<td>{$fabric.reg_time|date:Y-m-d}</td>
        <td><a href="{url app=fabric_shop&act=show&fsid=$fabric.user_id}">{$fabric.user_name|escape}</a></td>
        <td>{$fabric_types.$fabric.ftype_id}</td>
        <td>{$fabric.phone_mob}</td>
        <td>{$fabric.phone_tel}</td>
        <td>{$fabric.is_qq}</td>
        <td>{$fabric.wx_sn}</td>
        <td align="left">{$fabric.email|escape}</td>
      </tr>
	  <!--{/foreach}-->
    </table>
    {include file=page.html}
<script language="javascript" type="text/javascript" src="{res file=js/tab_color.js}"></script>
</div></div>
</body>
</html>